package com.hust.hui.quicksilver.alarm.entity;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Created by yihui on 2017/4/19.
 */
public enum AlarmLevelEnum {
    NONE,

    LOG,

    EMAIL,

    WEIXIN,

    SMS;


    private static final Logger logger = LoggerFactory.getLogger(AlarmLevelEnum.class);



    public static AlarmLevelEnum getAlarm(String name) {
        try {
            return valueOf(name);
        } catch (Exception e) {
            logger.error("AlarmLevelEnum.getAlarm() error! e:{} name:{}", e, name);
            return NONE;
        }
    }

}
